package Student;
import java.util.Comparator;

public class Student implements Comparable{
    private String name;
    public int age;
    private int weight;
    private int grade;
    public int getGrade() {
        return this.grade;
    }
    public void setGrade(int grade) {
        this.grade = grade;
    }
    public Student(String name, int age, int  weight, int grade) {
        this.name = name;
        this.grade = grade;
        this.age = age;
        this.weight = weight;
    }
    public int compareTo(Object o) {
        return ((Student)this).name.compareTo(((Student)o).name);
    }
    public String toString() {
        return "name = " + this.name + "| age = " + this.age + "| weight = " + this.weight + "| grade = " + this.grade;
    }
}


